package com.hhkj.study.admin.resource.model.res;

import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.hhkj.study.admin.resource.model.podo.ResourceCourseVideoPo;
import com.ruoyi.common.utils.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
*
* @author SERVER
* @since 2024-09-06
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class ResourceCourseVideoRes extends ResourceCourseVideoPo {

    /**
     * 视频时长格式化
     */
    private String durationFormatValue;

    public String getDurationFormatValue() {
        return ObjectUtil.isNotNull(this.getDuration()) ? StringUtils.formatDuration(this.getDuration()) : "";
    }
}